import request from '@/utils/request'


// 分页获取商家列表
export function getAgentList(params) {
  return request({
    url: '/system/acddAgent/list',
    method: 'get',
    params
  })
}

// 新建商家
export function addAgent(data) {
  return request({
    url: '/system/acddAgent/add',
    method: 'POST',
    data
  })
}

// 修改商家
export function editAgent(data) {
  return request({
    url: '/system/acddAgent/edit',
    method: 'post',
    data
  })
}

// 商家查询(查看)
export function deleteAgent(id) {
  return request({
    url: `/system/acddAgent/remove/${id}`,
    method: 'POST'
  })
}

// 商家查询(查看)
export function getAgentDetail(id) {
  return request({
    url: `/system/acddAgent/getInfo/${id}`,
    method: 'GET'
  })
}

// 暂停/开启合同
export function controlAgent(data) {
  return request({
    url: `/system/acddAgent/changeStatus`,
    method: 'post',
    data
  })
}
